{extend name="default/base" /}
{block name="main"}
<style type="text/css">
  .wst-list tbody tr td{padding: 15px 20px}
  .wst-shop-content .sname{font-weight: bold;}
  .wst-shop-content .snum{float: right;font-weight: bold;color: #FF5722;}
  table {
    max-width: 100%;
    background-color: transparent;
    border-collapse: collapse;
    border-spacing: 0;
  }
  #list td {
      padding: 10px;
      border: 1px solid #eeeeee;
  }
</style>

<div class="wst-toolbar">
  <input type='hidden' id='shopExpressId' name='shopExpressId' class="ipt" value="{$shopExpressId}" />

  <input type="text" name="tempName" id="tempName" class="s-query" placeholder='模板名称'/>
  <a class="s-btn btn btn-primary" onclick="loadGrid2({$shopExpressId},0)"><i class="fa fa-search"></i>查询</a><span style="font-weight: bold;">【{$shopExpress['expressName']}】</span>
  <a class='btn btn-success' style="float:right;margin-left: 10px;" type='button' href="{:url('shop/express/index')}"><i class="fa fa-reply"></i>返回</a>
  <a class="btn btn-success" style="float:right;" href='{:url("shop/express/edit",["shopExpressId"=>$shopExpressId])}'><i class="fa fa-plus"></i>&nbsp;添加模板</a>

</div>
<div class="wst-shop-content"> 
   <table class='wst-list' style="margin-bottom: 20px;">
   <tbody id='list'></tbody>
   <tfoot>
     <tr align="center"><td colspan='5' id='pager'></td></tr>
   </tfoot>
   <script id="tblist" type="text/html">
   {{# if(d.length>0){ }}
     {{# for(var i = 0; i < d.length; i++){ }}
     <tr style="background: #E8F2FF">
      <td colspan='5'>
         <div class="sname wst-lfloat">{{d[i]["tempName"]}}</div>
         <div class="wst-rfloat">
          <a class="btn_opt btn_edit" href='javascript:toEdit({{d[i]["id"]}})'><i class="fa fa-edit"></i>编辑</a>
          {{# if(d[i]["tempType"]==1){ }}
          <a class="btn_opt btn_trash" href='javascript:del({{d[i]["id"]}})'><i class="fa fa-trash-o"></i>删除</a>
          {{# } }}
         </div>
      </td>
     </tr>
     <tr>
        <td>按件数</td>
        <td>首件(件)：<span class="snum">{{d[i]["buyNumStart"]}}</span></td>
        <td>首件运费(元)：<span class="snum">{{d[i]["buyNumStartPrice"]}}</span></td>
        <td>续件(件)：<span class="snum">{{d[i]["buyNumContinue"]}}</span></td>
        <td>续件运费(元)：<span class="snum">{{d[i]["buyNumContinuePrice"]}}</span></td>
     </tr>
     <tr>
        <td>按重量</td>
        <td>首重(kg)：<span class="snum">{{d[i]["weightStart"]}}</span></td>
        <td>首重运费(元)：<span class="snum">{{d[i]["weightStartPrice"]}}</span></td>
        <td>续重(kg)：<span class="snum">{{d[i]["weightContinue"]}}</span></td>
        <td>续重运费(元)：<span class="snum">{{d[i]["weightContinuePrice"]}}</span></td>
     </tr>
     <tr>
        <td>按体积</td>
        <td>首体积量(m³)：<span class="snum">{{d[i]["volumeStart"]}}</span></td>
        <td>首体积运费(元)：<span class="snum">{{d[i]["volumeStartPrice"]}}</span></td>
        <td>续体积量(m³)：<span class="snum">{{d[i]["volumeContinue"]}}</span></td>
        <td>续体积运费(元)：<span class="snum">{{d[i]["volumeContinuePrice"]}}</span></td>
     </tr>
     {{# } }}
   {{# }else{ }}
    <tr>
        <td colspan='5' style="text-align: center;">没有相关记录！</td>
    </tr>   
    {{# } }}
   </script>
  </table>
</div>

{/block}  
{block name="js"}
<script type='text/javascript' src='__SHOP__/express/express.js?v={$v}'></script>
<script>
$(function(){loadGrid2({$shopExpressId},0)});
</script>
{/block}